<?php

/**
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: magic_reveal.php 6757 2010-03-25 09:01:29Z cnteacher $
 */

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}

if(!DB::result(DB::query('SELECT COUNT(*) FROM '.DB::table('common_magicuselog')." WHERE id = '$id' AND idtype = '$idtype' AND mid = 'anonymous'"), 0)) {
	showmessage('magicuse_bad_object');
}

if(submitcheck("usesubmit")) {

	magic_use($mid, array('id'=>$id, 'idtype'=>$idtype), true);

	$op = 'show';
	$list = array();
	$query = DB::query('SELECT uid, username FROM '.DB::table('common_magicuselog')." WHERE id = '$id' AND idtype = '$idtype' AND mid = 'anonymous'");
	while($value = DB::fetch($query)) {

		$list[] = $value;
	}
}

?>